load("@rules_cc//cc:defs.bzl", "cc_library")

package(default_visibility = ["//:__subpackages__"])

cc_library(
    name = "hdrs",
    hdrs = [
        "FileHandler.h",
        "FileHandlerInstance.h",
        "Module.h",
        "ModuleUtils.h",
        "PluginManager.h",
        "XMPAtoms.h",
    ],
)

cc_library(
    name = "PluginHandler",
    srcs = [
        "FileHandlerInstance.cpp",
        "HostAPIImpl.cpp",
        "Module.cpp",
        "PluginManager.cpp",
        "XMPAtoms.cpp",
    ] + select({
        "@platforms//os:linux": ["OS_Utils_Linux.cpp"],
        "@platforms//os:macos": ["OS_Utils_Mac.cpp"],
    }),
    deps = [
        ":hdrs",
        "//XMPFiles/source:hdrs",
        "//XMPFiles/source/FormatSupport:hdrs",
        "//XMPFilesPlugins/api/source",
        "//build",
        "//public/include",
        "//source",
    ],
)
